package app;

import java.util.List;

import interfaces.LocalAplicationLayer;
import javax.ejb.Stateless;

import entityDAOs.*;
import entities.*;


@Stateless
public class SessionLocalAplicationLayer implements LocalAplicationLayer {
			
		public SessionLocalAplicationLayer(){}
	
		//Get Departament by IdDepartament
		public Departament getDepartament(Integer idDepartament) {
			DepartamentDAO dao = new DepartamentDAO();
			Departament a = dao.findById(idDepartament);
				
			return a;
		}
		
		//Get all Departaments 
		@SuppressWarnings("rawtypes")
		public List getAllDepartaments() {
			DepartamentDAO dao = new DepartamentDAO();
			List res = (List) dao.findAll();
				
			return res;
		}
		
}
